#ifndef METADATA
#define METADATA

#include <fstream>
#include <iostream>
#include <cstring>
#include <cstdlib>

#define MAXVERSION 10

using namespace std;

typedef enum tagged { development = 0, stable  = 1} Tag;

class Metadata //TO DO: na valw permissions
{
private:
	char version[MAXVERSION];	/* number of file revision */
	char creationDate[12];		/* Date created */
	char comments[100];		/* Comments */
	unsigned int deltaSize;		/* File's size */
	Tag tag;			/* File's tag */

	void GetDate ( char *string );
	friend ostream & operator << ( ostream &stream, Metadata metadata );
	friend istream & operator >> ( istream &stream, Metadata &metadata );
public:
        Metadata ( void ) {};
	Metadata ( char *filename, char *version = NULL);
        void PreviousMetaData ( Metadata &metadata );
        unsigned int DeltaSize ( void ) { return deltaSize; }
        void Version ( char *version );
        void Date ( char *date);
        Tag GetTag ( void ) { return tag; }
        void Stable ( void ) { tag = stable; }
};

#endif
